import request from "@/utils/request";
//得到首页数据
export const getDishDate=(canteenWindowId)=>{
    return request.get(`/staff/canteenWindow/${canteenWindowId}`)
}

//删除菜品
export const deleteDish=(dishId)=>{
    return request.delete(`/staff/${dishId}`)
}

//修改相关菜品
export const updateDish=(dishId,dishName,dishPicture,dishDescription,dishPrice)=>{
    return request.put(`/staff?dishId=${dishId}`,{
        dishName:dishName,
        dishPicture:dishPicture,
        dishDescription:dishDescription,
        dishPrice:dishPrice
    })
}
//增加菜品
export const addDish=(canteenWindowId,dishName,dishPicture,dishDescription,dishPrice)=>{
    return request.post(`/staff?canteenWindowId=${canteenWindowId}`,{
        dishName:dishName,
        dishPicture:dishPicture,
        dishDescription:dishDescription,
        dishPrice:dishPrice
    })
}
//上传菜品图片
// export const addImg=(file)=>{
//     return request.post('/staff/upload',{
//         file:file
//     })
// }

//查询单个菜品
export const getOneDish=(dishId)=>{
    return request.get(`/staff/dishs/${dishId}`)
}